<?php
require_once dirname(__FILE__) . '/../includes/common.inc.php';
require_once dirname(__FILE__) . '/../includes/pdoorm.inc.php';

header('Content-Type: text/plain');

$sql="
    insert into ns_v1purchaseitem
    SELECT a.*,b.oid_a AS order_id FROM ns_purchaseitem AS a LEFT JOIN  ns__ez_relation_myorder_purchaseitem AS b 
ON a.e_oid = b.oid_b
";

sql_execute($sql);
